package summer_vacation.lvchang.myyVacation;
import java.util.Scanner;
/**
 * Created by Administrator on 2015/9/6.
 */
public class Text12 {
    public static void main(String[] args) {
        int n;
        Scanner input=new Scanner(System.in);
        System.out.println("请输入一个整数n:");
        n=input.nextInt();
        boolean isF = true;
        for(int i=2;i<n;i++)
        {
        if(n%i==0){
        isF = false;
        break;
        }else{
        continue;
        }
        }
        if(isF){
        System.out.print(n+"是质数");
        }else{
        System.out.print(n+"不是质数");
        }

        }

        }